#!/usr/bin/perl -w

sub acc {
  unless ( -e $_[0] ) {
  print "file does not exist\n";
  }
  if ( -r $_[0] ) {
  print "file is readable \n";
  }
  if ( -w $_[0] ) {
  print "file is writable \n";
  }
  if ( -x $_[0] ) {
  print "file is executable \n";
  }
}

foreach (@ARGV) {
&acc ($_);
}
